home *** CD-ROM | disk | FTP | other *** search
- Path: yama.mcc.ac.uk!usenet
- From: Simon Letherman <simon@ma.man.ac.uk>
- Newsgroups: comp.lang.c
- Subject: Help with writing floating points numbers to strings
- Date: 14 Mar 1996 23:18:33 GMT
- Organization: Sirius Cybernetics Corporation
- Message-ID: <4ia9g9$d1f@yama.mcc.ac.uk>
- NNTP-Posting-Host: radau.ma.man.ac.uk
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.12 (X11; I; SunOS 4.1.3 sun4c)
- X-URL: news:comp.lang.c
-
- Hi.
-
- I've got a fairly dozy problem, but since I'm new to C it's got the
- better of me.
-
- I want to write output to a large string, which I can then get Mathematica
- to use to draw a graph. Unfortunately, this means that I've got to store
- floating point (actually double) variables in string format, and it
- really doesn't want to. I can usually get my code past the preprocessor,
- but when running anything like
- sprintf(string, "%lf", &double);
- I get the core dumped on me.
-
- Any ideas?
-
- Thanks,
- Simon.
- --
- Simon Letherman
- Department of Mathematics
- University of Manchester
- United Kingdom (simon@ma.man.ac.uk)
-
-